package com.ezops.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ezops.dao.facade.IAssetDataTransferFacade;
import com.ezops.dao.facade.IClientDataTransferFacade;
import com.ezops.dao.facade.ISystemPropertyFacade;
import com.ezops.models.Asset;
import com.ezops.models.EzopsClient;

@Controller
@RequestMapping("/lookup")
public class LookUpController {

	@Autowired
	private IAssetDataTransferFacade assetFacade;
	@Autowired
	private IClientDataTransferFacade ezopsClientFacade;
	@Autowired
	private ISystemPropertyFacade systemPropertyFacade;

	/**
	 * Return all the Assets on exception report
	 * 
	 * @return List of Assets
	 */
	@RequestMapping(value = "/getallassets", method = RequestMethod.GET)
	public @ResponseBody
	List<Asset> getAllAssets() {
		return assetFacade.getAllAssets();
	}

	/**
	 * Return all the EZOPS Client
	 * 
	 * @return
	 */
	@RequestMapping(value = "/getallezopsclients", method = RequestMethod.GET)
	public @ResponseBody
	List<EzopsClient> getAllEzopsClients() {
		return ezopsClientFacade.getAllEzopsClients();
	}

}
